﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using StockClient;

namespace StockClientBll
{
    public class UserInfoBll
    {

        public bool isOkUser(string username, string paw)
        {

            return true;
        }

        public DataTable getUserDataSource()
        {
            string sql = "select ac_no,e_name from customer where e_name is not null";
            return GetDataTable(sql);

        
        }

        
        /// <summary>
        /// 通过表返回在查询的数据
        /// </summary>
        /// <param name="strSQL">要查询的SQL语句</param>
        /// <returns>返回填充表</returns>
        public  DataTable GetDataTable(string strSQL)
        {
            DataTable dttemp = null;
            try
            {
                dttemp = SqlHelper.ExecuteDatetable(SqlHelper.SQLConnectionString, strSQL);

            }
            catch (Exception ex)
            {
                ex.GetBaseException();
                //MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            }
            return dttemp;
        }
    }
}
